package com.lixinxinlove.jaychoumusic.page.util

import androidx.compose.runtime.Composable
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController
import com.lixinxinlove.jaychoumusic.page.LoginScreen
import com.lixinxinlove.jaychoumusic.page.MusicListScreen
import com.lixinxinlove.jaychoumusic.page.MusicPlayScreen
import com.lixinxinlove.jaychoumusic.page.WelcomeScreen

/**
 *   author ： lixinxin
 *   time    ： 2021-12-24
 *   email：895330766@qq.com
 */
@Composable
fun NavControllerPage() {
    val navController = rememberNavController()
    NavHost(
        navController = navController,
        startDestination = Screen.WelcomeScreen.route
    ) {
        composable(route = Screen.WelcomeScreen.route) {
            WelcomeScreen(navController = navController)
        }
        composable(route = Screen.LoginScreen.route) {
            LoginScreen(navController = navController)
        }
        composable(route = Screen.MusicListScreen.route) {
            MusicListScreen(navController = navController)
        }
        composable(route = Screen.MusicPlayScreen.route) {
            MusicPlayScreen()
        }
    }
}